<!doctype html>
<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">
    <meta charset="utf-8">
    <title>suggestion指定提交数据的form</title>
    <!--demo展示所用css，不用关心 begin-->
    <link rel="stylesheet" type="text/css" href="../../../assets/reset.css" />
    <link rel="stylesheet" type="text/css" href="../../../examples/assets/suggestion_demo.css" />
    <!--demo展示所用css end-->

    <!--组件依赖css begin-->
    <link rel="stylesheet" type="text/css" href="../../../assets/widget/suggestion/suggestion.css" />
    <link rel="stylesheet" type="text/css" href="../../../assets/widget/suggestion/suggestion.default.css" />    <!--皮肤文件，若不使用该皮肤，可以不加载-->
    <!--组件依赖css end-->

    <!--组件依赖js begin-->
    <script type="text/javascript" src="../../../dist/zepto.js"></script>

    <!--gmu extend文件-->
    <script type="text/javascript" src="../../../src/extend/touch.js"></script>      <!--新版zepto合并版中不包括touch.js-->
    <script type="text/javascript" src="../../../src/extend/highlight.js"></script>

    <!--gmu base文件-->
    <script type="text/javascript" src="../../../src/core/gmu.js"></script>
    <script type="text/javascript" src="../../../src/core/event.js"></script>
    <script type="text/javascript" src="../../../src/core/widget.js"></script>

    <script type="text/javascript" src="../../../src/widget/suggestion/suggestion.js"></script>
    <script type="text/javascript" src="../../../src/widget/suggestion/sendrequest.js"></script>
    <script type="text/javascript" src="../../../src/widget/suggestion/renderlist.js"></script>
    <!--组件依赖js end-->
</head>
<body>
<h2>指定提交数据的form</h2>
<form id="form1" action="http://www.baidu.com/s" method="get">
    <div class="search">
        <div class="search-input"><input type="text" id="input" name="wd"></div>
        <div class="search-button"><button class="submit">百度一下</button></div>
    </div>
</form>

<script type="text/javascript">
    (function () {
        $('#input').suggestion({
            form: '#form1',
            source: "../../data/suggestion.php"
        })

        $('.submit').on('click', function () {
            $('#form1').submit();
        });
    })();
</script>

<!--demo公用头部展示所用js，可以不用加载 begin-->
<!--<script id="bootstrap" src="../../example.js" type="text/javascript"
        data-page="sug(setup模式)|suggestion_setup.html, sug(render方式)|suggestion_render.html, sug(共享localstorage)|suggestion_share.html, sug(自定义提交的form)|suggestion_submit.html,sug(关闭后不再出现)|suggestion_close.html"></script>-->
<!--demo公用头部展示所用js end-->

</body>
</html>